package com.joy.model;

import lombok.*;

import java.util.Date;

@Setter
@Getter
@Data
@Builder
public class Assignment {
    private Integer assignmentId; // 任务ID，自增主键
    private Integer courseId; // 课程ID，引用自course表的外键
    private String assignmentName; // 任务名称
    private String description; // 任务描述
    private String publishWay; // 任务发布方式
    private Date startTime; // 任务开始时间
    private Date endTime; // 任务结束时间
    private Date createTime; // 最后修改时间
    private Date modifyTime; // 创建时间

    public Integer getAssignmentId() {
        return assignmentId;
    }

    public void setAssignmentId(Integer assignmentId) {
        this.assignmentId = assignmentId;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public String getAssignmentName() {
        return assignmentName;
    }

    public void setAssignmentName(String assignmentName) {
        this.assignmentName = assignmentName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getPublishWay() {
        return publishWay;
    }

    public void setPublishWay(String publishWay) {
        this.publishWay = publishWay;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public Assignment() {

    }

    @Override
    public String toString() {
        return "Assignment{" +
                "assignmentId=" + assignmentId +
                ", courseId=" + courseId +
                ", assignmentName='" + assignmentName + '\'' +
                ", description='" + description + '\'' +
                ", publishWay='" + publishWay + '\'' +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", createTime=" + createTime +
                ", modifyTime=" + modifyTime +
                '}';
    }

    public Assignment(Integer assignmentId, Integer courseId, String assignmentName, String description, String publishWay, Date startTime, Date endTime, Date createTime, Date modifyTime) {
        this.assignmentId = assignmentId;
        this.courseId = courseId;
        this.assignmentName = assignmentName;
        this.description = description;
        this.publishWay = publishWay;
        this.startTime = startTime;
        this.endTime = endTime;
        this.createTime = createTime;
        this.modifyTime = modifyTime;
    }
}